﻿using SqlSugar;
using System;

namespace SEIPropertyDataService.Entity.Models
{
    /// <summary>
    /// 系统操作日志模型
    /// </summary>
    [SplitTable(SplitType.Season)]//按季分表 （自带分表支持 年、季、月、周、日）
    [SugarTable("sys_operation_log_{year}{month}{day}")]
    public class SysOperationLogModel
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string Id { get; set; }
        /// <summary>
        /// 系统代号
        /// </summary>
        [SugarColumn(ColumnDescription = "系统代号")]
        public string SystemId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(ColumnDescription = "用户名")]
        public string UserName { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(ColumnDescription = "用户ID")]
        public string UserId { get; set; }

        /// <summary>
        /// 操作类型
        /// </summary>
        [SugarColumn(ColumnDescription = "操作类型")]
        public string Type { get; set; }

        /// <summary>
        /// 操作数据
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "操作数据")]
        public string TableCode { get; set; }

        /// <summary>
        /// 操作数据名称
        /// </summary>
        [SugarColumn(ColumnDescription = "操作数据名称")]
        public string TableName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "描述", ColumnDataType = "text")]
        public string Description { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "备注", ColumnDataType = "text")]
        public string Remark { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SplitField]
        [SugarColumn(IsNullable = false)]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// ip地址
        /// </summary>
        public string Ip { get; set; }
    }
}
